﻿var promises = require('../Node Wrapper/Promises.js');

// Optional mapping to pre-completed promises.
exports.resolved = promises.Promise.fulfilledWith;
exports.rejected = promises.Promise.rejectedWith;

exports.deferred = function(){
        var d = new promises.Deferred();
        return {
                promise: d.promise(),
                resolve: d.fulfill,
                reject: d.reject
            };
    };